<%@ page language="java"
	import="com.skyline.jfs.namespace.model.*,java.util.List"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JFS Create Directory</title>
<% 
JFSDirectory parent=(JFSDirectory)request.getAttribute("parentDir");
%>
<script type="text/javascript">
	function getPath(){
		//alert(document.all.name.value);
		var parentPath=document.all.parentPathHidden.value;
		var dirName=document.all.name.value;
		var parentPathFont=document.all.parentPathFont;
		parentPathFont.innerHTML=parentPath+dirName;
	}
</script>

</head>
<body>
<table>
	<tr>
		<td width="240" valign="top"><%@ include file="../adminNavi.jsp"%>
		</td>
		<td valign="top">
		<form action="../createDir.html" method="post">
		<table>
			<tr>
				<td width="40">parent</td>
				<td><%=parent.getId() %>
				<input type="hidden" id="parent" name="parent" value="<%=parent.getId()%>"></td>
			</tr>
			<tr>
				<td>path</td>
				<td><font id="parentPathFont"><%=parent.getPath()%></font>
				<input type="hidden" id="parentPathHidden" name="parentPathHidden" value="<%=parent.getPath()%>"/></td>
			</tr>
			<tr>
				<td>name</td>
				<td><input type="text" id="name" name="name" size="20" onblur="getPath()"></td>
			</tr>
			<tr>
				<td>permission</td>
				<td><select id="permission" name="permission">
					<option value="2">write and delete(rwx)</option>
					<option value="1">read and write(rw)</option>
					<option value="0">read only(r)</option>					
				</select></td>
			</tr>
			<tr>
			<td colspan="2" align="right">
			<input type="submit" value="submit"/>
			<input type="reset" value="reset"/>
			</td>
			</tr>
		</table>
		
		</form>
		</td>
	</tr>
</table>
</body>
</html>